package com.weds.frame.auth.mapper;

import com.weds.frame.auth.entity.ScCodeTypeEntity;
import com.weds.frame.auth.entity.ScUser;
import com.weds.frame.auth.entity.SysInfoData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.scheduling.annotation.Async;

import java.sql.Timestamp;
import java.util.List;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2023/3/31 10:17
 */
@Mapper
public interface CommMapper {

    /**
     * @Author: Yi
     * @Description 获取表最新主键序列
     * @Date: 8:41 2018/5/8
     */
    Integer getKeyNextval(String seq);

    /**
     * @Author: Yi
     * @Description 获取表当前主键序列
     * @Date: 8:41 2018/5/8
     */
    Integer getKeyCurrval(@Param("seq") String seq);

    /**
     * @Author: Yi
     * @Description 刷新物化视图
     * @Date: 9:57 2018/11/20
     */
    @Async
    void refreshView(@Param("viewName") String viewName, @Param("isConcurrently") Integer isConcurrently);

    /**
     * @Author: Yi
     * @Description 刷新物化视图（同步进程）
     * @Date: 9:57 2018/11/20
     */
    void refreshViewSync(@Param("viewName") String viewName, @Param("isConcurrently") Integer isConcurrently);

    Timestamp getNowTime();

    List<ScUser> selectUserByDept(@Param("deptId") Integer deptId, @Param("likeStr") String likeStr);

    SysInfoData getSysInfo(@Param("client") String client, @Param("filePath") String filePath);

    void refreshMv(@Param("target") String target);

    List<ScCodeTypeEntity> selectAllTypes();
}
